<?php

/**
 * info actions.
 *
 * @package    symfony
 * @subpackage info
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class infoActions extends sfActions
{
 /**
  * Executes index action
  *
  * @param sfRequest $request A request object
  */
  public function executeIndex(sfWebRequest $request)
  {
    $this->newss = Doctrine_Core::getTable('News')
      ->createQuery('a')
      ->execute();
  }
  
  public function executeShow(sfWebRequest $request)
  {
    $this->news = Doctrine_Core::getTable('News')->
     find($this->getRequestParameter('id'));
    $this->news->increase(); // baazdaa View gesen field uusge
    $this->getUser()->setAttribute('LastNews',  $this->news->getTitle());
  }
}
